#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;

int main()
{
	int N;
	cin >> N;
	int x = 0;
	int y = 0;
	while (N--)
	{
		int X;
		cin >> X;
		if (X >= 10 && X <= 20)
		{
			x++;
		}
		else
		{
			y++;
		}
	}
	cout << x << " in" << endl;
	cout << y << " out" << endl;
	return 0;
}